﻿<div>
    <p>Do you want to delete this? Really?</p>

    <button @onclick="Yes" class="btn btn-danger">Yes</button>
    <button @onclick="No" class="btn btn-primary">No</button>
</div>

@code {

    [CascadingParameter]
    BlazoredModalInstance ModalInstance { get; set; }

    async Task Yes() => await ModalInstance.CloseAsync(ModalResult.Ok(true));
    async Task No() => await ModalInstance.CancelAsync();

}